<!DOCTYPE html>
<html>
	<head>
		<meta charset="UTF-8">
		<title></title>
		<script type="text/javascript">
	        function f(){
				var sheng=document.getElementById("sheng").value;
				switch(sheng){
				  case"河南省":
					var cities=["开封","焦作","郑州"];
					break;
				  case"湖南省":
					var cities=["长沙","张家界","株洲"];
					break;
				  case"云南省":
					var cities=["昆明","丽江","普洱"];
					break;
				};
				for (var i=0; i<cities.length;i++){
					var city=document.getElementById("city");
					city.options[i]=new Option(cities[i],cities[i]);
				};
			}
		</script>
	</head>
	<body>
		<select id="sheng" onchange="f()">
			<option value="空值" selected="selected">请选择省份</option>
			<option value="河南省">河南省</option>
			<option value="湖南省">湖南省</option>
			<option value="云南省">云南省</option>
		</select>
		&nbsp;
		<select id="city"></select>
	</body>
</html>
